<?php defined( '_JEXEC' ) or die( 'Restricted access' ); // No direct access ?>
    <div class="subhead">
        <fieldset>
            <legend>
                <h3>
                    Search for audios
                </h3>
            </legend>
            <form name="form1" id="form1" method="POST" action="<?php echo JRoute::_('index.php?option=com_volunteer&task=searchfile'); ?>">
                <table border="0">
                    <tr>
                        <td>
                            Location:
                        </td>
                        <td>
                            Timespan:
                        </td>
                        <td>
                            Industry:
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <select name="location">
                                <option value="<?php echo '-1' ?>">
                                    <?php echo 'All' ?>
                                </option>
                                <?php foreach($this->
                                    locations as $item) : ?>
                                    <option value="<?php echo $item->id ?>" <?php if($item->
                                        id == JRequest::getVar('location')) { ?>selected="selected"
                                        <?php }; ?>
                                            >
                                            <?php echo $item->
                                                name ?>
                                    </option>
                                    <?php endforeach; ?>
                            </select>
                        </td>
                        <td>
                            <select name="timespan">
                                <option value="<?php echo '-1' ?>">
                                    <?php echo 'All' ?>
                                </option>
                                <?php foreach($this->
                                    timespans as $item) : ?>
                                    <option value="<?php echo $item->id ?>" <?php if($item->
                                        id == JRequest::getVar('timespan')) { ?>selected="selected"
                                        <?php }; ?>
                                            >
                                            <?php echo $item->
                                                name ?>
                                    </option>
                                    <?php endforeach; ?>
                            </select>
                        </td>
                        <td>
                            <select name="industry">
                                <option value="<?php echo '-1' ?>">
                                    <?php echo 'All' ?>
                                </option>
                                <?php foreach($this->
                                    industries as $item) : ?>
                                    <option value="<?php echo $item->id ?>" <?php if($item->
                                        id == JRequest::getVar('industry')) { ?>selected="selected"
                                        <?php }; ?>
                                            >
                                            <?php echo $item->
                                                name ?>
                                    </option>
                                    <?php endforeach; ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            (Optional) Enter one or more keyword(s) separated by comma
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <input type="text" name="keywords" size="50" value="<?php echo JRequest::getVar('keywords'); ?>"
                            />
                            <input type="submit" value="Search" />
                            <br/>
                            <input type="button" value="View All Files" onclick="javascript:window.location=('<?php echo JRoute::_('index.php?option=com_volunteer&view=searchfile&location=-1&timespan=-1&industry=-1&keywords=#content') ;?>');"
                            />
                            <input type="button" value="Add a new file" onclick="javascript:window.location=('<?php echo JRoute::_('index.php?option=com_volunteer&view=addfile') ;?>');"
                            />
                        </td>
                    </tr>
                </table>
            </form>
        </fieldset>
    </div>